package com.sctvcloud.bazhong.http;

import java.lang.reflect.Type;

/**
 * Created by Ly on 2016/11/29.
 */
public interface INetCallback<T> {

    int NET_CODE_NULLDATA = 30;
    int NET_CODE_TIMEOUT = 31;
    int NET_CODE_UNCONNECT = 32;
    int NET_CODE_USER_ERROR=401;

    void onPrepare();

    void onSuc(T t);

    void onError(Throwable ex, String errorMsg);

    void onError(Throwable ex, String errorMsg, int netCode);

    void onEnd();

    T doInBackground(T t);

    Class<T> getParseClass();

    Type getParseType();

    void setRequestUrl(String str);

    void setSome(Object o);

    void setIsTest(boolean isTest);

    boolean whenLoginExpiredBackGround();
}
